<?php
class Arm_Form_Element_Decimal extends Zend_Form_Element
{
  public function init(){
    parent::init();

    $this ->addValidator(new Zend_Validate_Regex('/^\d*.\d{2}$/'));
    $this ->setOptions(array(
      'size'        => 10,
      'onkeyup'     => 'formMoneyMasc(this.id)',
      'onblur'      => 'validateMoney(this.id)',
    ));

    $this->addErrorMessage('Numero invalido! Utilize separador "." e 2 casas de precisao (Ex. 1000.00)');
    $this ->addFilter('StripTags');
    $this ->addFilter('StringTrim');
    $this ->addFilter('StringToLower');
  }
}
